<?php
/*
	快速输出json
*/

class json{

	//输出json格式
	function out($code,$msgbox,$data)
	{
		$json->code = $code;
		$json->msgbox = $msgbox;
		$json->data = $data;
		$json->count = count($data);
		echo urldecode(json_encode($json));
	}

	//自定义json
	function custom($json)
	{
		echo urldecode(json_encode($json));
	}

	function text($json){
		return urldecode(json_encode($json));
	}


}

?>